<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <meta HTTP-EQUIV="Expires" CONTENT="0">
    <title>后台管理系统</title>
    <link rel="stylesheet" type="text/css" href="/admin/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/admin/css/style.css">
    <link rel="stylesheet" type="text/css" href="/admin/css/font-awesome.min.css">
    <link rel="apple-touch-icon-precomposed" href="/admin/images/icon/icon.png">
    <link rel="shortcut icon" href="/admin/images/icon/favicon.ico">
    <link rel="stylesheet" type="text/css" href="/ztree/awesomeStyle/awesome.css"/>
    <style type="text/css">

        .sidebar {
            background-color: #3399CC;
        }

        .container {
            max-width: 350px;
        }

        ul {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .nav li {
            border-bottom: 1px solid #eee;
        }

        .nav li a {
            font-size: 14px;
        }

        #accordionMenu {
            max-width: 400px;
        }

        .panel-body {
            padding: 0;
        }

        .panel-group .panel + .panel {
            margin-top: 0;
            border-top: 0;
        }

        .panel-group .panel {
            border-radius: 0;
        }

        .panel-default > .panel-heading {
            color: #777;
            background-color: #fff;
            border-color: #fff;
            padding: 0;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        .panel-default > .panel-heading a {
            display: block;
            padding: 10px 15px;
            text-decoration: none;
        }

        .panel-default > .panel-heading a:after {
            content: "";
            position: relative;
            top: 1px;
            display: inline-block;
            font-family: 'Glyphicons Halflings';
            /*font-style: normal;*/
            /*font-weight: 400;*/
            /*line-height: 1;*/
            /*-webkit-font-smoothing: antialiased;*/
            /*-moz-osx-font-smoothing: grayscale;*/
            float: right;
            transition: transform .25s linear;
            -webkit-transition: -webkit-transform .25s linear;
        }

        .panel-default > .panel-heading a[aria-expanded="true"] {
            color: #fff;
            background-color: #3399CC;
        }

        .panel-default > .panel-heading a[aria-expanded="true"]:after {
            content: "\e113";
        }

        .panel-default > .panel-heading a[aria-expanded="false"]:after {
            content: "\e114";
        }

        /*分割线*/
    </style>
    <script src="/admin/js/jquery-2.1.4.min.js"></script>
    <script type="text/javascript" src="/ztree/jquery.ztree.all.js"></script>
    <script>
        $(function () {
            $('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
            $('.tree li.parent_li > span').on('click', function (e) {
                var children = $(this).parent('li.parent_li').find(' > ul > li');
                if (children.is(":visible")) {
                    children.hide('fast');
                    $(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign');
                } else {
                    children.show('fast');
                    $(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign');
                }
                e.stopPropagation();
            });

            //zTree
            var zTreeBeforeExpand = true;

            var setting = {
                view: {
                    // addHoverDom: addHoverDom,
                    // removeHoverDom: removeHoverDom,
                    dblClickExpand: true,//双击节点时，是否自动展开父节点的标识
                    showLine: true,//是否显示节点之间的连线
                    // fontCss: {'color': '#333', 'font-weight': 'bold'},//字体样式函数
                    selectedMulti: true //设置是否允许同时选中多个节点
                },
                async: {
                    enable: true,  //开启异步加载处理
                    contentType: "application/json;charset=utf-8",
                    dataType: "json",
                    url: "/back/menu",    //加载后台数据
                    //autoParam: ["id", "name"],
                    type: "post",
                    //autoParam:[]
                    otherParam: []
                    // dataFilter: filter     //用于对 Ajax 返回数据进行预处理的函数
                },
                check: {
                    chkboxType: {"Y": "ps", "N": "ps"},
                    chkStyle: "checkbox",//复选框类型
                    enable: false //每个节点上是否显示 CheckBox
                },
                edit: {
                    enable: false,
                    editNameSelectAll: true,
                    showRemoveBtn: true,
                    showRenameBtn: true,
                    removeTitle: "删除",
                    renameTitle: "编辑"
                },
                data: {
                    simpleData: {//简单数据模式
                        enable: true,
                        idKey: "id",
                        pIdKey: "parentId",
                        rootPId: 0
                    }
                },
                callback: {
                    // beforeExpand: zTreeBeforeExpand, // 用于捕获父节点展开之前的事件回调函数，并且根据返回值确定是否允许展开操作
                }
            };



            var newCount = 1;

            function addHoverDom(treeId, treeNode) {
                var aObj = $("#" + treeNode.tId + "_a");
                if ($("#diyBtn_" + treeNode.id).length > 0) return;
                var editStr = ""
                        + "<span class='button add' id='diyBtn_" + treeNode.id
                        + "' title='" + treeNode.name + "' onfocus='this.blur();'></span>";
                aObj.append(editStr);
                var btn = $("#diyBtn_" + treeNode.id);

                if (btn) btn.bind("click", function () {
                    var zTree = $.fn.zTree.getZTreeObj("regionZTree");
                    zTree.addNodes(treeNode, {
                        id: (treeNode.id + newCount),
                        parentid: treeNode.id,
                        name: "new node" + (newCount++)
                    });
                    return false;
                });

            };

            function removeHoverDom(treeId, treeNode) {
                $("#diyBtn_" + treeNode.id).unbind().remove();
                $("#diyBtn_space_" + treeNode.id).unbind().remove();
            };


            var dominZTree2 = [
                {
                    name: "功能菜单",
                    id: "0",
                    parentId: "rwe34234",
                    children: [
                        {
                            name: "栏目管理",
                            id: "9a0f967ba7bb4fa89c5b4955de613dd9",
                            parentId: "9a0f967ba7bb4fa89c5b4955de613dd9",
                            checked: "true"
                        },
                        {
                            name: "文章管理",
                            id: "2",
                            parentId: "0"
                        },
                        {
                            name: "留言管理",
                            id: "3",
                            parentId: "0"
                        },
                        {
                            name: "用户管理",
                            id: "4",
                            parentId: "0"
                        },
                        {
                            name: "系统设置",
                            id: "5",
                            parentId: "0",
                            children: [
                                {
                                    name: "角色管理",
                                    id: "6",
                                    parentId: "5"
                                },
                                {
                                    name: "菜单管理",
                                    id: "7",
                                    parentId: "5"
                                }
                            ]
                        }
                    ]
                }

            ];

            // var zTreeObj = $.fn.zTree.init($("#regionZTree"), setting, dominZTree2);

            var zTree = $.fn.zTree.init($("#regionZTree"), setting);
            zTree.expandAll(true);
            /*$.ajax({
                type: "post",
                url: "/back/sys/menu/show",
                data: {},
                dataType: "json",
                success: function (data) {
                    var treeObj = $.fn.zTree.init($("#regionZTree"), setting, data);
                    treeObj.expandAll(true);//ztree最
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    alert(XMLHttpRequest.status);
                    alert(XMLHttpRequest.readyState);
                    alert(textStatus);
                }
            });*/


        });
    </script>
</head>

<body class="user-select" style="overflow:hidden;">
<section class="container-fluid">
    <header>
        <nav class="navbar navbar-default navbar-fixed-top">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                            data-target="#bs-example-navbar-collapse-1" aria-expanded="false"><span
                            class="sr-only">切换导航</span> <span class="icon-bar"></span> <span class="icon-bar"></span>
                        <span class="icon-bar"></span></button>
                    <a class="navbar-brand" href="/back/index">后台系统</a></div>
                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" role="button"
                                                aria-haspopup="true"
                                                aria-expanded="false"><#--<@shiro.principal property="userName" />-->${(userinfo.userName)!}
                            【角色：${(userinfo.roles[0].roleName)!}】<span
                                    class="caret"></span></a>
                            <ul class="dropdown-menu dropdown-menu-left">
                                <li><a title="查看或修改个人信息" data-toggle="modal"
                                       data-target="#seeUserInfo">个人信息</a></li>
                                <li><a title="查看您的登录记录" data-toggle="modal"
                                       data-target="#seeUserLoginlog">登录记录</a></li>
                            </ul>
                        </li>
                        <li><a href="/logout" onClick="if(!confirm('是否确认退出？'))return false;">退出登录</a></li>
                        <li><a data-toggle="modal" data-target="#WeChat">帮助</a></li>
                    </ul>

                </div>
            </div>
        </nav>
    </header>
    <div class="row">
        <aside class="col-sm-3 col-md-2 col-lg-2 sidebar">
            <ul class="nav nav-sidebar">
                <li class="active"><a href="/back/main" target="mainframe">系统报告</a></li>
            </ul>
        <#--<ul class="nav nav-sidebar">-->
        <#--<@shiro.hasAnyRoles name="admin,superAdmin">-->
        <#--<li><a href="/back/category/index" target="mainframe">栏目管理</a></li>-->
        <#--</@shiro.hasAnyRoles>-->
        <#--<li><a href="/back/article/index" target="mainframe">文章管理</a></li>-->
        <#--<@shiro.hasAnyRoles name="admin,superAdmin">-->
        <#--<li><a href="/back/message/index" target="mainframe">留言管理</a></li>-->
        <#--</@shiro.hasAnyRoles>-->
        <#--<@shiro.hasRole name="superAdmin">-->
        <#--<li><a href="/back/user/index?page=1" target="mainframe">用户管理</a></li>-->
        <#--</@shiro.hasRole>-->
        <#--<@shiro.hasRole name="superAdmin">-->
        <#--<li><a href="/back/sys/index?page=1" target="mainframe">系统设置</a></li>-->
        <#--</@shiro.hasRole>-->
        <#--<li><a href="/logout">退出</a></li>-->
        <#--</ul>-->

        <#--<div class="container">-->
        <#--<div class="panel-group" id="accordionMenu" role="tablist" aria-multiselectable="true">-->
        <#--<div class="panel panel-default">-->
        <#--<div class="panel-heading" role="tab" id="headingOne">-->
        <#--<h4 class="panel-title">-->
        <#--<a role="button" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseOne" aria-expanded="false" aria-controls="collapseOne">-->
        <#--栏目管理-->
        <#--</a>-->
        <#--</h4>-->
        <#--</div>-->
        <#--<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">-->
        <#--<div class="panel-body">-->
        <#--<ul class="nav">-->
        <#--<li class="active"><a href="/back/category/index" target="mainframe">栏目管理</a></li>-->
        <#--</ul>-->
        <#--</div>-->
        <#--</div>-->
        <#--</div>-->
        <#--<div class="panel panel-default">-->
        <#--<div class="panel-heading" role="tab" id="headingTwo">-->
        <#--<h4 class="panel-title">-->
        <#--<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">-->
        <#--文章管理-->
        <#--</a>-->
        <#--</h4>-->
        <#--</div>-->
        <#--<div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">-->
        <#--<div class="panel-body">-->
        <#--<ul class="nav">-->
        <#--<li><a href="/back/article/index" target="mainframe">文章管理</a></li>-->
        <#--</ul>-->
        <#--</div>-->
        <#--</div>-->
        <#--</div>-->
        <#--<div class="panel panel-default">-->
        <#--<div class="panel-heading" role="tab" id="headingThree">-->
        <#--<h4 class="panel-title">-->
        <#--<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">-->
        <#--留言管理-->
        <#--</a>-->
        <#--</h4>-->
        <#--</div>-->
        <#--<div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">-->
        <#--<div class="panel-body">-->
        <#--<ul class="nav">-->
        <#--<li><a href="/back/message/index" target="mainframe">留言管理</a></li>-->
        <#--</ul>-->
        <#--</div>-->
        <#--</div>-->
        <#--</div>-->


        <#--<div class="panel panel-default">-->
        <#--<div class="panel-heading" role="tab" id="headingFour">-->
        <#--<h4 class="panel-title">-->
        <#--<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseFour" aria-expanded="false" aria-controls="collapseFour">-->
        <#--用户管理-->
        <#--</a>-->
        <#--</h4>-->
        <#--</div>-->
        <#--<div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFour">-->
        <#--<div class="panel-body">-->
        <#--<ul class="nav">-->
        <#--<li><a href="/back/user/index?page=1" target="mainframe">用户管理</a></li>-->
        <#--</ul>-->
        <#--</div>-->
        <#--</div>-->
        <#--</div>-->

        <#--<@shiro.hasRole name="superAdmin">-->
        <#--<div class="panel panel-default">-->
        <#--<div class="panel-heading" role="tab" id="headingFive">-->
        <#--<h4 class="panel-title">-->
        <#--<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordionMenu" href="#collapseFive" aria-expanded="false" aria-controls="collapseFour">-->
        <#--系统设置-->
        <#--</a>-->
        <#--</h4>-->
        <#--</div>-->
        <#--<div id="collapseFive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFive">-->
        <#--<div class="panel-body">-->
        <#--<ul class="nav">-->
        <#--<li><a href="/back/sys/menu/index?page=1" target="mainframe">菜单设置</a></li>-->
        <#--<li><a href="/back/sys/role/index?page=1" target="mainframe">角色设置</a></li>-->
        <#--</ul>-->
        <#--</div>-->
        <#--</div>-->
        <#--</div>-->
        <#--</@shiro.hasRole>-->
        <#---->

        <#--</div>-->
        <#--</div>-->

        <ul id="regionZTree" class="ztree"></ul>

        </aside>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-lg-10 col-md-offset-2 main" id="main"
             style="margin-top: 0px;padding-top: 0px;padding-bottom: 0px;margin-bottom: 0px;">
            <iframe id="mainframe" name="mainframe" src="/back/main"
                    style="width: 100%;border: 0px;margin: 0px;padding: 0px;"></iframe>
            <script type="text/javascript">
                var height = $(window).height() - 50;

                $("#mainframe").attr("height", "" + height + "px;");
                $("aside ul li").click(function () {
                    $("aside ul li").removeClass("active");
                    $(this).addClass("active");
                });

            </script>
        </div>
    </div>
</section>
<!--个人信息模态框-->
<div class="modal fade" id="seeUserInfo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <form action="" method="post">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">个人信息</h4>
                </div>
                <div class="modal-body">
                    <table class="table" style="margin-bottom:0px;">
                        <thead>
                        <tr></tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td wdith="20%">姓名:</td>
                            <td width="80%"><input type="text" value="${(userinfo.userName)!}" readonly
                                                   class="form-control" name="truename" maxlength="10"
                                                   autocomplete="off"/></td>
                        </tr>
                        <tr>
                            <td wdith="20%">用户名:</td>
                            <td width="80%"><input type="text" value="${(userinfo.userAccount)!}" readonly
                                                   class="form-control" name="username" maxlength="10"
                                                   autocomplete="off"/></td>
                        </tr>
                        <tr>
                            <td wdith="20%">电话:</td>
                            <td width="80%"><input type="text" value="${(userinfo.userPhone)!}" readonly
                                                   class="form-control" name="usertel" maxlength="13"
                                                   autocomplete="off"/></td>
                        </tr>
                        <#--<tr>-->
                        <#--<td wdith="20%">旧密码:</td>-->
                        <#--<td width="80%"><input type="password" class="form-control" name="old_password" maxlength="18" autocomplete="off" /></td>-->
                        <#--</tr>-->
                        <#--<tr>-->
                        <#--<td wdith="20%">新密码:</td>-->
                        <#--<td width="80%"><input type="password" class="form-control" name="password" maxlength="18" autocomplete="off" /></td>-->
                        <#--</tr>-->
                        <#--<tr>-->
                        <#--<td wdith="20%">确认密码:</td>-->
                        <#--<td width="80%"><input type="password" class="form-control" name="new_password" maxlength="18" autocomplete="off" /></td>-->
                        <#--</tr>-->
                        </tbody>
                        <tfoot>
                        <tr></tr>
                        </tfoot>
                    </table>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <#--<button type="submit" class="btn btn-primary">提交</button>-->
                </div>
            </div>
        </form>
    </div>
</div>
<!--个人登录记录模态框-->
<div class="modal fade" id="seeUserLoginlog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">登录记录</h4>
            </div>
            <div class="modal-body">
                <table class="table" style="margin-bottom:0px;">
                    <thead>
                    <tr>
                        <th>登录IP</th>
                        <th>登录时间</th>
                        <th>状态</th>
                    </tr>
                    </thead>
                    <tbody>
                <#list (loginlist)! as loginlog>
                <tr>
                    <td>${(loginlog.loginIp)!}</td>
                    <td>${(loginlog.loginTime?datetime)!}</td>
                    <td>${((loginlog.loginStatus == '1')?string('成功','失败'))! }</td>
                </tr>
                </#list>
                    </tbody>
                </table>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">朕已阅</button>
            </div>
        </div>
    </div>
</div>
<!--微信二维码模态框-->
<div class="modal fade user-select" id="WeChat" tabindex="-1" role="dialog" aria-labelledby="WeChatModalLabel">
    <div class="modal-dialog" role="document" style="margin-top:120px;max-width:280px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="WeChatModalLabel" style="cursor:default;">微信扫一扫</h4>
            </div>
            <div class="modal-body" style="text-align:center"><img src="/admin/images/weixin.jpg" alt=""
                                                                   style="cursor:pointer"/></div>
        </div>
    </div>
</div>
<!--提示模态框-->
<div class="modal fade user-select" id="areDeveloping" tabindex="-1" role="dialog"
     aria-labelledby="areDevelopingModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="areDevelopingModalLabel" style="cursor:default;">该功能正在日以继夜的开发中…</h4>
            </div>
            <div class="modal-body"><img src="/admin/images/baoman/baoman_01.gif" alt="深思熟虑"/>
                <p style="padding:15px 15px 15px 100px; position:absolute; top:15px; cursor:default;">
                    很抱歉，程序猿正在日以继夜的开发此功能，本程序将会在以后的版本中持续完善！</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">朕已阅</button>
            </div>
        </div>
    </div>
</div>
<!--右键菜单列表-->
<div id="rightClickMenu">
    <ul class="list-group rightClickMenuList">
        <li class="list-group-item disabled">欢迎访问异清轩后台</li>
        <li class="list-group-item"><span>IP：</span>172.16.10.129</li>
        <li class="list-group-item"><span>地址：</span>河南省郑州市</li>
        <li class="list-group-item"><span>系统：</span>Windows10</li>
        <li class="list-group-item"><span>浏览器：</span>Chrome47</li>
    </ul>
</div>
<script src="/admin/js/bootstrap.min.js"></script>
<script src="/admin/js/admin-scripts.js"></script>
</body>
</html>
